<template>
	<view>
		<navBar title="发优惠券"></navBar>
		<image class="banner" :src="bg_image.merBanner"></image>
		<view class="content">
			<view class="coupon" v-if="data.merchantCouponType===1">
				<image class="coupon-bg" :src="bg_image.iconCoupon"></image>
				<view class="coupon-msg">
					<view class="left">
						<view>创建满减券</view>
						<view class="left-msg">抵扣单笔指定金额</view>
					</view>
					<view class="right" @click="open(1)">
						<view>立即</view>
						<view>创建</view>
					</view>
				</view>
			</view>
			<view class="coupon"  v-if="data.merchantCouponType===2">
				<image class="coupon-bg" :src="bg_image.iconCoupon2"></image>
				<view class="coupon-msg">
					<view class="left">
						<view>创建全免券</view>
						<view class="left-msg">抵扣单笔全部金额</view>
					</view>
					<view class="right yellow" @click="showQrCode('/pages/indoor/sendCoupon',2)">
						<view>立即</view>
						<view>创建</view>
					</view>
				</view>
			</view>
			<view class="rule">
				<view class="rule-title">
					使用规则
				</view>
				<view class="rule-content">
					<view>1、每个用户单次只能领取1张优惠券；</view>
					<view>2、每笔停车订单只能使用1张优惠券进行抵扣；</view>
					<view>3、用户领取优惠券后24小内有效，超时作废；</view>
					<view>4、优惠券仅支持线上支付使用，不支持退款；</view>
					<view>5、本次活动最终解释权归智慧停车所有，如有其他问题请联系客服！</view>
				</view>
			</view>
		</view>
		<u-popup
		:border-radius="22"
		mode="center" v-model="showOverlay">
			<view class="popup-content">
				<view class="popup-content-title">满减券</view>
				<input type="number" class="money-input" v-model="query.couponMoney" placeholder="请输入金额" />
				<view class="popup-btn" @click="showQrCode('/pages/indoor/sendCoupon',1)">出示二维码</view>
				<view class="popup-btn" @click="sendUser('/pages/indoor/couponByPlate')">发送给指定用户</view>
			</view>
			
		</u-popup>
	</view>
</template>

<script>
	import coupon from './js/coupon'
	
	export default {
		components: {
		  
		},
		...coupon 
	}
</script>

<style lang="less" scoped>
	@import url('./css/coupon.less');
</style>